var app = angular.module('ZJPC');

app.controller('ResetController', ['$scope', 'CesiumService', function($scope, CesiumService) {


	$scope.reset = CesiumService.reset;
	
  $scope.showBuilding = true;
  $scope.showFacility = true;
  $scope.showPlane = true;

  $scope.changeBuilding = function () {
    if($scope.showBuilding) {
      // CesiumService.removeAllEntity();
      // $scope.showFacility = false;
      // CesiumService.checkShow(0);
      // CesiumService.setMonitor();
      $scope.showBuilding = false;
      CesiumService.checkShowBuilding(true);
    }
    else {
      // CesiumService.removeAllEntity();
      // CesiumService.setNoHeightMonitor();
      $scope.showBuilding = true;
      CesiumService.checkShowBuilding(false);
    }
  }

  $scope.changeFacility = function () {
    if($scope.showFacility) {
      $scope.showFacility = false;
      CesiumService.checkShow(0);
    }
    else {
      $scope.showFacility = true;
      CesiumService.checkShow(-1);
    }
  }

  $scope.changePlane = function () {
    if($scope.showPlane) {
      $scope.showPlane = false;
      CesiumService.addPlane();
    }
    else {
      $scope.showPlane = true;
      CesiumService.hidePlane();
    }
  }


}])